home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1993 July / InfoMagic USENET CD-ROM July 1993.ISO / sources / misc / volume22 / ecu / patch02 < prev    next >
Encoding:
Text File  |  1991-08-16  |  34.6 KB  |  1,420 lines

  1. Newsgroups: comp.sources.misc
  2. From: Warren Tucker <wht@n4hgf.Mt-Park.GA.US>
  3. Subject:  v22i022:  ecu - ECU async comm package rev 3.10, Patch02
  4. Message-ID: <1991Aug16.022424.15036@sparky.IMD.Sterling.COM>
  5. X-Md4-Signature: cbc65ba3430c0cb2c940896fad780b0e
  6. Date: Fri, 16 Aug 1991 02:24:24 GMT
  7. Approved: kent@sparky.imd.sterling.com
  8.  
  9. Submitted-by: Warren Tucker <wht@n4hgf.Mt-Park.GA.US>
  10. Posting-number: Volume 22, Issue 22
  11. Archive-name: ecu/patch02
  12. Environment: SCO, XENIX, ISC
  13. Patch-To: ecu: Volume 21, Issue 53-89
  14.  
  15. This is patch 2 to ecu 3.10, issues v21i053 through v21i089.
  16.  
  17. The majority of this patch deals with the way SCO and ISC misimplement the
  18. nap() system call.  See README.p2 for details.
  19.  
  20. A lingering problem with the interactive command history handler is also
  21. fixed (pressing erroneous function keys caused the display to become
  22. garbaged).
  23.  
  24. Patch 1 is a prerequisite and this patch checks to see if it has been applied.
  25.  
  26. To apply the patch, unshar this file and do
  27.    patch < PATCH02.02
  28.  
  29. You do not need to rerun Config.
  30. do
  31.    make ecu
  32.    su root
  33.    make iecu
  34.  
  35. #!/bin/sh
  36. # This is a shell archive (shar 3.46)
  37. # made 08/13/1991 20:34 UTC by wht@n4hgf
  38. # Source directory /u1/src/ecu
  39. #
  40. # existing files will NOT be overwritten unless -c is specified
  41. #
  42. # This shar contains:
  43. # length  mode       name
  44. # ------ ---------- ------------------------------------------
  45. #   2203 -rw-r--r-- README.P2
  46. #  29065 -rw-r--r-- PATCH2.01
  47. #
  48. # ============= README.P2 ==============
  49. if test -f 'README.P2' -a X"$1" != X"-c"; then
  50.     echo 'x - skipping README.P2 (File already exists)'
  51. else
  52. echo 'x - extracting README.P2 (Text)'
  53. sed 's/^X//' << 'SHAR_EOF' > 'README.P2' &&
  54. XREADME.P2           ECU 3.10 Patch 2        Tue Aug 13 16:29:11 EDT 1991
  55. X
  56. XThis describes patch 2 to ECU 3.10, bringing the program to
  57. Xversion 3.12. 
  58. X
  59. XThe majority of this patch deals with the way SCO and ISC misimplement
  60. Xthe nap() system call.  A lingering problem with the interactive
  61. Xcommand history handler is also fixed (pressing erroneous function keys
  62. Xcaused the display to become garbaged).
  63. X
  64. XISC and SCO UNIX nap() misbehave.  This kludge doesn't return the
  65. Xproper value (the actual time slept), but at least it does not make
  66. Xa mockery of the manual page.  It says:
  67. X
  68. X     NAP(S)               UNIX System V            NAP(S)
  69. X
  70. X     Name
  71. X      nap -    suspends execution for a short interval
  72. X
  73. X     Syntax
  74. X      long nap(period)
  75. X      long period;
  76. X
  77. X     Description
  78. X      The current process is suspended from    execution for at least
  79. X      the number of    milliseconds specified by period, or until a
  80. X      signal is received.
  81. X
  82. X     Return Value
  83. X      On successful    completion, a long integer indicating the
  84. X      number of milliseconds actually slept    is returned. If    the
  85. X      process received a signal while napping, the return value
  86. X      will be -1, and errno    will be    set to EINTR.
  87. X
  88. X     See Also
  89. X      sleep(S)
  90. X
  91. X     Notes
  92. X      This function    is driven by the system    clock, which in    most
  93. X      cases    has a granularity of tens of milliseconds.  This
  94. X      function must    be linked with the linker option -lx.
  95. X
  96. XIt appears nap() under UNIX 3.2.x has departed virtually entirely from
  97. Xthe manual page.  I'm beginning to look rather silly in several
  98. Xmilleus since I keep telling people SCO UNIX is a viable upgrade from
  99. XXENIX.  But process control people need some kind of timing capability
  100. Xless than one second and we can't do it with nap or select.
  101. X
  102. Xnap(msec) is supposed to nap *at least* msec milliseconds.  However,
  103. Xif msec is specified less than 1000/HZ + 1, it will not nap at all.
  104. XThis was true for 3.2.0 and 3.2.1.
  105. X
  106. XIt is supposed to return the number of milliseconds it actually
  107. Xslept.  Instead, it appears to "save up" the values and return them in
  108. Xlots of 1000. This behavior is true for 3.2.2.
  109. X
  110. XAs it is nap() is nearly useless.  I believe select() suffers
  111. Xfrom the same deficiency (< 1000 msec timeout becomes 1000 msec) but
  112. XI haven't "proven" it yet.
  113. SHAR_EOF
  114. chmod 0644 README.P2 ||
  115. echo 'restore of README.P2 failed'
  116. Wc_c="`wc -c < 'README.P2'`"
  117. test 2206 -eq "$Wc_c" ||
  118.     echo 'README.P2: original size 2206, current size' "$Wc_c"
  119. fi
  120. # ============= PATCH2.01 ==============
  121. if test -f 'PATCH2.01' -a X"$1" != X"-c"; then
  122.     echo 'x - skipping PATCH2.01 (File already exists)'
  123. else
  124. echo 'x - extracting PATCH2.01 (Text)'
  125. sed 's/^X//' << 'SHAR_EOF' > 'PATCH2.01' &&
  126. X:
  127. X#-------------------------------------------------------
  128. X# PATCH2.01
  129. X# UNIX & ISC nap bug fix
  130. X# created by gendiff x1.03 on 13 Aug 1991 20:04 UTC
  131. X#-------------------------------------------------------
  132. X*** /u1/src/ecu311/patchlevel.h    Tue Aug  6 15:05:00 1991
  133. X--- patchlevel.h    Tue Aug 13 16:07:17 1991
  134. XPrereq: 11
  135. X***************
  136. X*** 1,1
  137. X! #define PATCHLEVEL 11
  138. X
  139. X--- 1,1 -----
  140. X! #define PATCHLEVEL 12
  141. X*** /u1/src/ecu311/ecu.c    Tue Aug 13 15:53:05 1991
  142. X--- ecu.c    Tue Aug 13 13:50:42 1991
  143. X***************
  144. X*** 186,192
  145. X          hz = atoi(getenv("HZ"));
  146. X      else
  147. X          hz = HZ;
  148. X!     hzmsec = (ulong)(1000 / hz) + 1;
  149. X  
  150. X  /*
  151. X   * if we are root (or setuid to root as we should be on 286 versions),
  152. X
  153. X--- 186,192 -----
  154. X          hz = atoi(getenv("HZ"));
  155. X      else
  156. X          hz = HZ;
  157. X!     hzmsec = (ulong)(1000 / hz) + 2;
  158. X  
  159. X  /*
  160. X   * if we are root (or setuid to root as we should be on 286 versions),
  161. X***************
  162. X*** 324,330
  163. X  */
  164. X          ff(se,
  165. X      "No problem, but just to warn you, the keyboard has parity enabled\r\n");
  166. X!         nap(500L);
  167. X      }
  168. X  
  169. X  /* check out line */
  170. X
  171. X--- 324,330 -----
  172. X  */
  173. X          ff(se,
  174. X      "No problem, but just to warn you, the keyboard has parity enabled\r\n");
  175. X!         Nap(500L);
  176. X      }
  177. X  
  178. X  /* check out line */
  179. X***************
  180. X*** 343,349
  181. X                  tcap_stand_end();
  182. X                  ff(se,"\r\n");
  183. X                  strcpy(shm->Lline,default_tty);
  184. X!                 nap(1000L);
  185. X              }
  186. X          }
  187. X      }
  188. X
  189. X--- 343,349 -----
  190. X                  tcap_stand_end();
  191. X                  ff(se,"\r\n");
  192. X                  strcpy(shm->Lline,default_tty);
  193. X!                 Nap(1000L);
  194. X              }
  195. X          }
  196. X      }
  197. X*** /u1/src/ecu311/ecu.h    Tue Aug 13 15:53:05 1991
  198. X--- ecu.h    Tue Aug 13 13:58:20 1991
  199. X***************
  200. X*** 3,8
  201. X      wht@n4hgf.Mt-Park.GA.US
  202. X  ------------------------------------------------------------------------*/
  203. X  /*+:EDITS:*/
  204. X  /*:08-09-1991-11:07-wht@n4hgf-configurable lock directory */
  205. X  /*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
  206. X  /*:01-25-1991-06:08-wht@n4hgf-mulltiple #define of ECULIBDIR */
  207. X
  208. X--- 3,9 -----
  209. X      wht@n4hgf.Mt-Park.GA.US
  210. X  ------------------------------------------------------------------------*/
  211. X  /*+:EDITS:*/
  212. X+ /*:08-13-1991-13:53-wht@n4hgf-UNIX and ISC nap() broken; XENIX still wins */
  213. X  /*:08-09-1991-11:07-wht@n4hgf-configurable lock directory */
  214. X  /*:07-25-1991-12:55-wht@n4hgf-ECU release 3.10 */
  215. X  /*:01-25-1991-06:08-wht@n4hgf-mulltiple #define of ECULIBDIR */
  216. X***************
  217. X*** 88,93
  218. X  #if defined(MALLOC_3X)
  219. X  #include <malloc.h>
  220. X  #endif
  221. X  
  222. X  /*
  223. X   * prototyes or external declarations
  224. X
  225. X--- 89,96 -----
  226. X  #if defined(MALLOC_3X)
  227. X  #include <malloc.h>
  228. X  #endif
  229. X+ 
  230. X+ long Nap();
  231. X  
  232. X  /*
  233. X   * prototyes or external declarations
  234. X*** /u1/src/ecu311/ecuDCE.c    Thu Jul 25 12:55:00 1991
  235. X--- ecuDCE.c    Tue Aug 13 13:50:42 1991
  236. X***************
  237. X*** 43,49
  238. X  #include "relop.h"
  239. X  
  240. X  long time();
  241. X! long nap();
  242. X  
  243. X  char *make_char_graphic();
  244. X  void DCE_hangup();
  245. X
  246. X--- 43,49 -----
  247. X  #include "relop.h"
  248. X  
  249. X  long time();
  250. X! long Nap();
  251. X  
  252. X  char *make_char_graphic();
  253. X  void DCE_hangup();
  254. X***************
  255. X*** 345,351
  256. X      DCE_read_modem_init();
  257. X  
  258. X      lputs_paced(0,"\b\b\b\b\b\b\b\b\b\r");
  259. X!     (void)nap(200L);
  260. X      lflush(0);
  261. X  
  262. X      while(!shm->Lmodem_already_init)
  263. X
  264. X--- 345,351 -----
  265. X      DCE_read_modem_init();
  266. X  
  267. X      lputs_paced(0,"\b\b\b\b\b\b\b\b\b\r");
  268. X!     (void)Nap(200L);
  269. X      lflush(0);
  270. X  
  271. X      while(!shm->Lmodem_already_init)
  272. X***************
  273. X*** 361,367
  274. X          {
  275. X              ltoggle_dtr();
  276. X              lputs_paced(0,"AT\r");
  277. X!             (void)nap(400L);
  278. X              lputs_paced(0,"ATQ0V1E1\r");
  279. X              (void)nap(400L);
  280. X          }
  281. X
  282. X--- 361,367 -----
  283. X          {
  284. X              ltoggle_dtr();
  285. X              lputs_paced(0,"AT\r");
  286. X!             (void)Nap(400L);
  287. X              lputs_paced(0,"ATQ0V1E1\r");
  288. X              (void)Nap(400L);
  289. X          }
  290. X***************
  291. X*** 363,369
  292. X              lputs_paced(0,"AT\r");
  293. X              (void)nap(400L);
  294. X              lputs_paced(0,"ATQ0V1E1\r");
  295. X!             (void)nap(400L);
  296. X          }
  297. X  
  298. X          lflush(0);
  299. X
  300. X--- 363,369 -----
  301. X              lputs_paced(0,"AT\r");
  302. X              (void)Nap(400L);
  303. X              lputs_paced(0,"ATQ0V1E1\r");
  304. X!             (void)Nap(400L);
  305. X          }
  306. X  
  307. X          lflush(0);
  308. X***************
  309. X*** 374,380
  310. X          {
  311. X              lputc_paced(0,*cmd++);
  312. X              if(++itmp < 2)
  313. X!                 (void)nap(40L);
  314. X              if((itmp = lgetc_timeout(500L)) < 0)
  315. X              {
  316. X                  if(sigint)
  317. X
  318. X--- 374,380 -----
  319. X          {
  320. X              lputc_paced(0,*cmd++);
  321. X              if(++itmp < 2)
  322. X!                 (void)Nap(40L);
  323. X              if((itmp = lgetc_timeout(500L)) < 0)
  324. X              {
  325. X                  if(sigint)
  326. X***************
  327. X*** 438,444
  328. X  register itmp;
  329. X  
  330. X      DCE_modem_init();
  331. X!     (void)nap(600L);
  332. X  
  333. X      lflush(0);
  334. X  #ifdef NEUROTIC
  335. X
  336. X--- 438,444 -----
  337. X  register itmp;
  338. X  
  339. X      DCE_modem_init();
  340. X!     (void)Nap(600L);
  341. X  
  342. X      lflush(0);
  343. X  #ifdef NEUROTIC
  344. X***************
  345. X*** 446,452
  346. X      {
  347. X          lputc_paced(20,*cmd++);
  348. X          if(++char_count < 2)
  349. X!             (void)nap(40L);
  350. X          if((itmp = lgetc_timeout(500L)) < 0)
  351. X              return(-1);
  352. X          pputc(itmp);
  353. X
  354. X--- 446,452 -----
  355. X      {
  356. X          lputc_paced(20,*cmd++);
  357. X          if(++char_count < 2)
  358. X!             (void)Nap(40L);
  359. X          if((itmp = lgetc_timeout(500L)) < 0)
  360. X              return(-1);
  361. X          pputc(itmp);
  362. X***************
  363. X*** 624,630
  364. X              setcolor(colors_error);
  365. X              pprintf("%s\n",result);
  366. X              lputc(0);                /* make modem go on hook */
  367. X!             (void)nap(40L);
  368. X              lputc(0);
  369. X              sigint = 0;
  370. X              (void)DCE_get_result(2000L);    /* wait for NO CARRIER */
  371. X
  372. X--- 624,630 -----
  373. X              setcolor(colors_error);
  374. X              pprintf("%s\n",result);
  375. X              lputc(0);                /* make modem go on hook */
  376. X!             (void)Nap(40L);
  377. X              lputc(0);
  378. X              sigint = 0;
  379. X              (void)DCE_get_result(2000L);    /* wait for NO CARRIER */
  380. X***************
  381. X*** 849,855
  382. X              delay,(kbdintr == DEL) ?"DEL":make_char_graphic(kbdintr,0));
  383. X          while(nap_msec > 0)
  384. X          {
  385. X!             nap_msec -= nap(100L);
  386. X              while(rdchk(0))
  387. X              {
  388. X                  ans = to_lower(ttygetc(1));
  389. X
  390. X--- 849,855 -----
  391. X              delay,(kbdintr == DEL) ?"DEL":make_char_graphic(kbdintr,0));
  392. X          while(nap_msec > 0)
  393. X          {
  394. X!             nap_msec -= Nap(100L);
  395. X              while(rdchk(0))
  396. X              {
  397. X                  ans = to_lower(ttygetc(1));
  398. X***************
  399. X*** 1014,1020
  400. X  {
  401. X      if(!Lmodem_autoans[0])
  402. X          return;
  403. X!     (void)nap(200L);
  404. X      lputs_paced(20,"AT\r");
  405. X      (void)nap(100L);
  406. X      lputs_paced(20,Lmodem_autoans); /* quiet modem */
  407. X
  408. X--- 1014,1020 -----
  409. X  {
  410. X      if(!Lmodem_autoans[0])
  411. X          return;
  412. X!     (void)Nap(200L);
  413. X      lputs_paced(20,"AT\r");
  414. X      (void)Nap(100L);
  415. X      lputs_paced(20,Lmodem_autoans); /* quiet modem */
  416. X***************
  417. X*** 1016,1022
  418. X          return;
  419. X      (void)nap(200L);
  420. X      lputs_paced(20,"AT\r");
  421. X!     (void)nap(100L);
  422. X      lputs_paced(20,Lmodem_autoans); /* quiet modem */
  423. X      lputs_paced(20,"\r");
  424. X      (void)nap(200L);
  425. X
  426. X--- 1016,1022 -----
  427. X          return;
  428. X      (void)Nap(200L);
  429. X      lputs_paced(20,"AT\r");
  430. X!     (void)Nap(100L);
  431. X      lputs_paced(20,Lmodem_autoans); /* quiet modem */
  432. X      lputs_paced(20,"\r");
  433. X      (void)Nap(200L);
  434. X***************
  435. X*** 1019,1025
  436. X      (void)nap(100L);
  437. X      lputs_paced(20,Lmodem_autoans); /* quiet modem */
  438. X      lputs_paced(20,"\r");
  439. X!     (void)nap(200L);
  440. X      lputs_paced(20,Lmodem_autoans); /* quiet modem */
  441. X      lputs_paced(20,"\r");
  442. X      (void)nap(200L);
  443. X
  444. X--- 1019,1025 -----
  445. X      (void)Nap(100L);
  446. X      lputs_paced(20,Lmodem_autoans); /* quiet modem */
  447. X      lputs_paced(20,"\r");
  448. X!     (void)Nap(200L);
  449. X      lputs_paced(20,Lmodem_autoans); /* quiet modem */
  450. X      lputs_paced(20,"\r");
  451. X      (void)Nap(200L);
  452. X***************
  453. X*** 1022,1028
  454. X      (void)nap(200L);
  455. X      lputs_paced(20,Lmodem_autoans); /* quiet modem */
  456. X      lputs_paced(20,"\r");
  457. X!     (void)nap(200L);
  458. X      lflush(0);
  459. X  }    /* end of DCE_autoanswer */
  460. X  
  461. X
  462. X--- 1022,1028 -----
  463. X      (void)Nap(200L);
  464. X      lputs_paced(20,Lmodem_autoans); /* quiet modem */
  465. X      lputs_paced(20,"\r");
  466. X!     (void)Nap(200L);
  467. X      lflush(0);
  468. X  }    /* end of DCE_autoanswer */
  469. X  
  470. X*** /u1/src/ecu311/ecufinsert.c    Thu Jul 25 12:55:00 1991
  471. X--- ecufinsert.c    Tue Aug 13 13:50:42 1991
  472. X***************
  473. X*** 220,226
  474. X              while(*cptr)
  475. X              {
  476. X                  lputc(*cptr++);
  477. X!                 nap(20L);
  478. X                  while(rdchk(shm->Liofd))
  479. X                  {
  480. X                      rchar = lgetc_xmtr();
  481. X
  482. X--- 220,226 -----
  483. X              while(*cptr)
  484. X              {
  485. X                  lputc(*cptr++);
  486. X!                 Nap(20L);
  487. X                  while(rdchk(shm->Liofd))
  488. X                  {
  489. X                      rchar = lgetc_xmtr();
  490. X***************
  491. X*** 233,239
  492. X          if(xmit_cr)
  493. X          {
  494. X              if(xmit_mode == 'p')
  495. X!                 nap(20L);
  496. X              lputc('\r');
  497. X              xmit_len++;
  498. X          }
  499. X
  500. X--- 233,239 -----
  501. X          if(xmit_cr)
  502. X          {
  503. X              if(xmit_mode == 'p')
  504. X!                 Nap(20L);
  505. X              lputc('\r');
  506. X              xmit_len++;
  507. X          }
  508. X*** /u1/src/ecu311/ecufork.c    Thu Jul 25 12:55:00 1991
  509. X--- ecufork.c    Tue Aug 13 13:50:43 1991
  510. X***************
  511. X*** 38,44
  512. X          if((pid = fork()) >= 0)
  513. X              return(pid);
  514. X          if(count)
  515. X!             nap(40L);
  516. X      }
  517. X      return(-1);
  518. X  }    /* end of smart_fork */
  519. X
  520. X--- 38,44 -----
  521. X          if((pid = fork()) >= 0)
  522. X              return(pid);
  523. X          if(count)
  524. X!             Nap(40L);
  525. X      }
  526. X      return(-1);
  527. X  }    /* end of smart_fork */
  528. X*** /u1/src/ecu311/ecuicmhist.c    Tue Aug 13 15:53:09 1991
  529. X--- ecuicmhist.c    Tue Aug 13 15:25:25 1991
  530. X***************
  531. X*** 106,117
  532. X  register ICMDH *icmdh = icmdh_tail;
  533. X  uchar delim;
  534. X  
  535. X-     if((func != XFcurup) && (func != XFhome))
  536. X-     {
  537. X-         ring_bell();
  538. X-         return(1);
  539. X-     }
  540. X- 
  541. X      if(!icmdh)
  542. X      {
  543. X          ff(se,"no interactive commands saved\r\n");
  544. X
  545. X--- 106,111 -----
  546. X  register ICMDH *icmdh = icmdh_tail;
  547. X  uchar delim;
  548. X  
  549. X      if(!icmdh)
  550. X      {
  551. X          ff(se,"  no interactive commands saved\r\n");
  552. X***************
  553. X*** 114,120
  554. X  
  555. X      if(!icmdh)
  556. X      {
  557. X!         ff(se,"no interactive commands saved\r\n");
  558. X          return(1);
  559. X      }
  560. X      while(1)
  561. X
  562. X--- 108,114 -----
  563. X  
  564. X      if(!icmdh)
  565. X      {
  566. X!         ff(se,"  no interactive commands saved\r\n");
  567. X          return(1);
  568. X      }
  569. X      while(1)
  570. X*** /u1/src/ecu311/eculine.c    Tue Aug 13 15:53:10 1991
  571. X--- eculine.c    Tue Aug 13 13:50:44 1991
  572. X***************
  573. X*** 192,198
  574. X  int delim_len;
  575. X  long quantum;
  576. X  long ltmp;
  577. X! long nap();
  578. X  
  579. X      delim_len = (lrwt->delim) ? strlen(lrwt->delim) : 0;
  580. X  
  581. X
  582. X--- 192,198 -----
  583. X  int delim_len;
  584. X  long quantum;
  585. X  long ltmp;
  586. X! long Nap();
  587. X  
  588. X      delim_len = (lrwt->delim) ? strlen(lrwt->delim) : 0;
  589. X  
  590. X***************
  591. X*** 239,245
  592. X      *cptr = 0;                    /* init result string */
  593. X      while(timeout_counter--)
  594. X      {
  595. X!         nap(quantum);
  596. X  
  597. X          if(check_sigint && sigint)
  598. X              goto INTERRUPTED;
  599. X
  600. X--- 239,245 -----
  601. X      *cptr = 0;                    /* init result string */
  602. X      while(timeout_counter--)
  603. X      {
  604. X!         Nap(quantum);
  605. X  
  606. X          if(check_sigint && sigint)
  607. X              goto INTERRUPTED;
  608. X***************
  609. X*** 410,416
  610. X  {
  611. X  uchar rtn_char;
  612. X  #if defined(NO_SELECT)
  613. X! long nap();
  614. X  long timeout;
  615. X  
  616. X  AGAIN:
  617. X
  618. X--- 410,416 -----
  619. X  {
  620. X  uchar rtn_char;
  621. X  #if defined(NO_SELECT)
  622. X! long Nap();
  623. X  long timeout;
  624. X  
  625. X  AGAIN:
  626. X***************
  627. X*** 419,425
  628. X      {
  629. X          if(sigint)
  630. X              return(-1);
  631. X!         if((timeout -= nap(hzmsec)) <= 0)
  632. X              return(-1);
  633. X      }
  634. X  
  635. X
  636. X--- 419,425 -----
  637. X      {
  638. X          if(sigint)
  639. X              return(-1);
  640. X!         if((timeout -= Nap(hzmsec)) <= 0)
  641. X              return(-1);
  642. X      }
  643. X  
  644. X***************
  645. X*** 595,601
  646. X  {
  647. X  
  648. X      lputc(lchar);    
  649. X!     nap((long)(pace_msec ? pace_msec : LPUTS_NAP_COUNT));
  650. X  
  651. X  }    /* end of lputc_paced */
  652. X  
  653. X
  654. X--- 595,601 -----
  655. X  {
  656. X  
  657. X      lputc(lchar);    
  658. X!     Nap((long)(pace_msec ? pace_msec : LPUTS_NAP_COUNT));
  659. X  
  660. X  }    /* end of lputc_paced */
  661. X  
  662. X***************
  663. X*** 937,943
  664. X      b0t.c_cflag &= ~CBAUD;
  665. X  
  666. X      ioctl(shm->Liofd,TCSETA,(char *)&b0t);        /* drop DTR */
  667. X!     nap(1000L);
  668. X      ioctl(shm->Liofd,TCSETA,(char *)&Ltermio);    /* raise DTR */
  669. X      nap(300L);
  670. X  
  671. X
  672. X--- 937,943 -----
  673. X      b0t.c_cflag &= ~CBAUD;
  674. X  
  675. X      ioctl(shm->Liofd,TCSETA,(char *)&b0t);        /* drop DTR */
  676. X!     Nap(1000L);
  677. X      ioctl(shm->Liofd,TCSETA,(char *)&Ltermio);    /* raise DTR */
  678. X      Nap(300L);
  679. X  
  680. X***************
  681. X*** 939,945
  682. X      ioctl(shm->Liofd,TCSETA,(char *)&b0t);        /* drop DTR */
  683. X      nap(1000L);
  684. X      ioctl(shm->Liofd,TCSETA,(char *)&Ltermio);    /* raise DTR */
  685. X!     nap(300L);
  686. X  
  687. X  }    /* end of ltoggle_dtr */
  688. X  
  689. X
  690. X--- 939,945 -----
  691. X      ioctl(shm->Liofd,TCSETA,(char *)&b0t);        /* drop DTR */
  692. X      Nap(1000L);
  693. X      ioctl(shm->Liofd,TCSETA,(char *)&Ltermio);    /* raise DTR */
  694. X!     Nap(300L);
  695. X  
  696. X  }    /* end of ltoggle_dtr */
  697. X  
  698. X*** /u1/src/ecu311/ecuphone.c    Tue Aug 13 15:53:12 1991
  699. X--- ecuphone.c    Tue Aug 13 13:50:44 1991
  700. X***************
  701. X*** 491,497
  702. X                  {
  703. X                      dirw_bot_msg("created new (empty) directory file");
  704. X                      ring_bell();
  705. X!                     nap(1000L);
  706. X                  }
  707. X                  goto TRY_OPEN;
  708. X              }
  709. X
  710. X--- 491,497 -----
  711. X                  {
  712. X                      dirw_bot_msg("created new (empty) directory file");
  713. X                      ring_bell();
  714. X!                     Nap(1000L);
  715. X                  }
  716. X                  goto TRY_OPEN;
  717. X              }
  718. X***************
  719. X*** 1700,1706
  720. X                  close(itmp);
  721. X                  dirw_bot_msg("created new (empty) directory file");
  722. X                  ring_bell();
  723. X!                 nap(1000L);
  724. X                  goto READ_LIST;
  725. X              }
  726. X              if(errno == ENOENT)
  727. X
  728. X--- 1700,1706 -----
  729. X                  close(itmp);
  730. X                  dirw_bot_msg("created new (empty) directory file");
  731. X                  ring_bell();
  732. X!                 Nap(1000L);
  733. X                  goto READ_LIST;
  734. X              }
  735. X              if(errno == ENOENT)
  736. X***************
  737. X*** 1836,1842
  738. X                          (kbdintr == DEL) ?"DEL":make_char_graphic(kbdintr,0));
  739. X                      while(nap_decisec--)
  740. X                      {
  741. X!                         nap(100L);
  742. X                          if(rdchk(0))
  743. X                          {
  744. X                              ans = to_lower(ttygetc(1));
  745. X
  746. X--- 1836,1842 -----
  747. X                          (kbdintr == DEL) ?"DEL":make_char_graphic(kbdintr,0));
  748. X                      while(nap_decisec--)
  749. X                      {
  750. X!                         Nap(100L);
  751. X                          if(rdchk(0))
  752. X                          {
  753. X                              ans = to_lower(ttygetc(1));
  754. X*** /u1/src/ecu311/ecuphrase.c    Thu Jul 25 12:56:00 1991
  755. X--- ecuphrase.c    Tue Aug 13 13:50:45 1991
  756. X***************
  757. X*** 196,202
  758. X                                      cptr++;
  759. X                                  if(!itmp)
  760. X                                      itmp = 1;
  761. X!                                 nap((long)itmp * 100L);
  762. X                                  break;
  763. X                              case 'a':
  764. X                                  itmp = atoi(cptr);
  765. X
  766. X--- 196,202 -----
  767. X                                      cptr++;
  768. X                                  if(!itmp)
  769. X                                      itmp = 1;
  770. X!                                 Nap((long)itmp * 100L);
  771. X                                  break;
  772. X                              case 'a':
  773. X                                  itmp = atoi(cptr);
  774. X*** /u1/src/ecu311/ecuscrdump.c    Thu Jul 25 12:56:00 1991
  775. X--- ecuscrdump.c    Tue Aug 13 13:50:45 1991
  776. X***************
  777. X*** 85,91
  778. X          xbell(XBELL_DONE,1);
  779. X  #else
  780. X          ring_bell();
  781. X!         nap(50L);
  782. X          ring_bell();
  783. X  #endif
  784. X          return;
  785. X
  786. X--- 85,91 -----
  787. X          xbell(XBELL_DONE,1);
  788. X  #else
  789. X          ring_bell();
  790. X!         Nap(50L);
  791. X          ring_bell();
  792. X  #endif
  793. X          return;
  794. X***************
  795. X*** 104,110
  796. X          {
  797. X              if(!rdchk(0))
  798. X              {
  799. X!                 nap(hzmsec * 3);
  800. X                  if(!rdchk(0))
  801. X                      break;
  802. X              }
  803. X
  804. X--- 104,110 -----
  805. X          {
  806. X              if(!rdchk(0))
  807. X              {
  808. X!                 Nap(hzmsec * 3);
  809. X                  if(!rdchk(0))
  810. X                      break;
  811. X              }
  812. X*** /u1/src/ecu311/ecusetup.c    Tue Aug 13 15:53:14 1991
  813. X--- ecusetup.c    Tue Aug 13 13:50:45 1991
  814. X***************
  815. X*** 387,393
  816. X          setw_err_msg(cptr);
  817. X          if(!retries--)
  818. X              break;
  819. X!         nap(1000L);
  820. X          setw_err_msg("");
  821. X      }
  822. X      setup_open_status();
  823. X
  824. X--- 387,393 -----
  825. X          setw_err_msg(cptr);
  826. X          if(!retries--)
  827. X              break;
  828. X!         Nap(1000L);
  829. X          setw_err_msg("");
  830. X      }
  831. X      setup_open_status();
  832. X*** /u1/src/ecu311/ecusighdl.c    Thu Jul 25 12:56:00 1991
  833. X--- ecusighdl.c    Tue Aug 13 13:50:46 1991
  834. X***************
  835. X*** 153,159
  836. X                  if(kill(rcvr_pid,0) && (errno == ESRCH))
  837. X                      break;
  838. X                  errno = 0;
  839. X!                 nap(40L);
  840. X                  wait_count--;
  841. X              }
  842. X              if(!wait_count)
  843. X
  844. X--- 153,159 -----
  845. X                  if(kill(rcvr_pid,0) && (errno == ESRCH))
  846. X                      break;
  847. X                  errno = 0;
  848. X!                 Nap(40L);
  849. X                  wait_count--;
  850. X              }
  851. X              if(!wait_count)
  852. X***************
  853. X*** 161,167
  854. X                  while(!kill(rcvr_pid,SIGKILL))
  855. X                  {
  856. X                      wait((int *)0);
  857. X!                     nap(40L);
  858. X                  }
  859. X              }
  860. X              rcvr_pid = -1;
  861. X
  862. X--- 161,167 -----
  863. X                  while(!kill(rcvr_pid,SIGKILL))
  864. X                  {
  865. X                      wait((int *)0);
  866. X!                     Nap(40L);
  867. X                  }
  868. X              }
  869. X              rcvr_pid = -1;
  870. X*** /u1/src/ecu311/ecutty.c    Thu Jul 25 12:57:00 1991
  871. X--- ecutty.c    Tue Aug 13 14:55:55 1991
  872. X***************
  873. X*** 797,802
  874. X      {
  875. X          itmp = 0;
  876. X          timeout_remaining = tty_escape_timeout;
  877. X          while((!isalpha(ctmp)) && (itmp < sizeof(tgc_accum) - 1) &&
  878. X              (timeout_remaining > 0))
  879. X          {
  880. X
  881. X--- 797,806 -----
  882. X      {
  883. X          itmp = 0;
  884. X          timeout_remaining = tty_escape_timeout;
  885. X+ #if defined(NAP_DEBUG)
  886. X+         ff(se,"timeout_remaining = %ld hzmsec=%ld\r\n",
  887. X+             timeout_remaining,hzmsec);
  888. X+ #endif
  889. X          while((!isalpha(ctmp)) && (itmp < sizeof(tgc_accum) - 1) &&
  890. X              (timeout_remaining > 0))
  891. X          {
  892. X***************
  893. X*** 800,806
  894. X          while((!isalpha(ctmp)) && (itmp < sizeof(tgc_accum) - 1) &&
  895. X              (timeout_remaining > 0))
  896. X          {
  897. X!             timeout_remaining -= nap(hzmsec);
  898. X              if(!rdchk(TTYIN))
  899. X                  continue;
  900. X              read(TTYIN,(char *)&ctmp,1);
  901. X
  902. X--- 804,813 -----
  903. X          while((!isalpha(ctmp)) && (itmp < sizeof(tgc_accum) - 1) &&
  904. X              (timeout_remaining > 0))
  905. X          {
  906. X!             timeout_remaining -= Nap(hzmsec);
  907. X! #if defined(NAP_DEBUG)
  908. X!             ff(se,"timeout_remaining = %ld\r\n",timeout_remaining);
  909. X! #endif
  910. X              if(!rdchk(TTYIN))
  911. X                  continue;
  912. X              read(TTYIN,(char *)&ctmp,1);
  913. X***************
  914. X*** 849,854
  915. X          tgc_accum[0] = ctmp;
  916. X          tgc_accum[itmp = 1] = 0;
  917. X          timeout_remaining = tty_escape_timeout;
  918. X          while(((ctmp = map_nonansi_key(tgc_accum,itmp)) >= XF_no_way) &&
  919. X              (timeout_remaining > 0))
  920. X          {
  921. X
  922. X--- 856,865 -----
  923. X          tgc_accum[0] = ctmp;
  924. X          tgc_accum[itmp = 1] = 0;
  925. X          timeout_remaining = tty_escape_timeout;
  926. X+ #if defined(NAP_DEBUG)
  927. X+         ff(se,"timeout_remaining = %ld hzmsec=%ld\r\n",
  928. X+             timeout_remaining,hzmsec);
  929. X+ #endif
  930. X          while(((ctmp = map_nonansi_key(tgc_accum,itmp)) >= XF_no_way) &&
  931. X              (timeout_remaining > 0))
  932. X          {
  933. X***************
  934. X*** 852,858
  935. X          while(((ctmp = map_nonansi_key(tgc_accum,itmp)) >= XF_no_way) &&
  936. X              (timeout_remaining > 0))
  937. X          {
  938. X!             timeout_remaining -= nap(hzmsec);
  939. X              if(!rdchk(TTYIN))
  940. X                  continue;
  941. X              read(TTYIN,(char *)&ctmp,1);
  942. X
  943. X--- 863,872 -----
  944. X          while(((ctmp = map_nonansi_key(tgc_accum,itmp)) >= XF_no_way) &&
  945. X              (timeout_remaining > 0))
  946. X          {
  947. X!             timeout_remaining -= Nap(hzmsec);
  948. X! #if defined(NAP_DEBUG)
  949. X!             ff(se,"timeout_remaining = %ld\r\n",timeout_remaining);
  950. X! #endif
  951. X              if(!rdchk(TTYIN))
  952. X                  continue;
  953. X              read(TTYIN,(char *)&ctmp,1);
  954. X*** /u1/src/ecu311/ecuutil.c    Tue Aug 13 15:53:15 1991
  955. X--- ecuutil.c    Tue Aug 13 15:04:29 1991
  956. X***************
  957. X*** 3,8
  958. X      wht@n4hgf.Mt-Park.GA.US
  959. X  
  960. X    Defined functions:
  961. X      arg_token(parsestr,termchars)
  962. X      ascii_name_to_hex(str3char)
  963. X      ascii_to_hex(ascii)
  964. X
  965. X--- 3,9 -----
  966. X      wht@n4hgf.Mt-Park.GA.US
  967. X  
  968. X    Defined functions:
  969. X+     Nap(msec)
  970. X      arg_token(parsestr,termchars)
  971. X      ascii_name_to_hex(str3char)
  972. X      ascii_to_hex(ascii)
  973. X***************
  974. X*** 8,13
  975. X      ascii_to_hex(ascii)
  976. X      build_arg_array(cmd,arg,arg_max_quan,narg_rtn)
  977. X      build_str_array(str,arg,str_max_quan,nstr_rtn)
  978. X      disp_line_termio(fd,text)
  979. X      disp_stat(st)
  980. X      disp_termio(ttt,text)
  981. X
  982. X--- 9,16 -----
  983. X      ascii_to_hex(ascii)
  984. X      build_arg_array(cmd,arg,arg_max_quan,narg_rtn)
  985. X      build_str_array(str,arg,str_max_quan,nstr_rtn)
  986. X+     cfree(p,num,size)
  987. X+     defeat_optimize_to_work_around_bug(would_be_optimized)
  988. X      disp_line_termio(fd,text)
  989. X      disp_stat(st)
  990. X      disp_termio(ttt,text)
  991. X***************
  992. X*** 11,17
  993. X      disp_line_termio(fd,text)
  994. X      disp_stat(st)
  995. X      disp_termio(ttt,text)
  996. X!     errno_text(errno)
  997. X      find_shell_chars(command)
  998. X      get_curr_dir(cdir,cdir_max)
  999. X      get_home_dir(home_dir)
  1000. X
  1001. X--- 14,20 -----
  1002. X      disp_line_termio(fd,text)
  1003. X      disp_stat(st)
  1004. X      disp_termio(ttt,text)
  1005. X!     errno_text(err_no)
  1006. X      find_shell_chars(command)
  1007. X      get_curr_dir(cdir,cdir_max)
  1008. X      get_home_dir(home_dir)
  1009. X***************
  1010. X*** 17,23
  1011. X      get_home_dir(home_dir)
  1012. X      hex_to_ascii_name(char_val)
  1013. X      make_char_graphic(ch,incl_3char)
  1014. X-     make_dirs(pathname)
  1015. X      make_ecu_subdir()
  1016. X      mem_cpy(dest,src,len);
  1017. X      mkdir(dpath,dmode)
  1018. X
  1019. X--- 20,25 -----
  1020. X      get_home_dir(home_dir)
  1021. X      hex_to_ascii_name(char_val)
  1022. X      make_char_graphic(ch,incl_3char)
  1023. X      make_ecu_subdir()
  1024. X      mem_cpy(dest,src,len)
  1025. X      mode_map(mode,mode_str)
  1026. X***************
  1027. X*** 19,26
  1028. X      make_char_graphic(ch,incl_3char)
  1029. X      make_dirs(pathname)
  1030. X      make_ecu_subdir()
  1031. X!     mem_cpy(dest,src,len);
  1032. X!     mkdir(dpath,dmode)
  1033. X      mode_map(mode,mode_str)
  1034. X      pad_zstr_to_len(zstr,len)
  1035. X      perror_errmsg(str)
  1036. X
  1037. X--- 21,27 -----
  1038. X      hex_to_ascii_name(char_val)
  1039. X      make_char_graphic(ch,incl_3char)
  1040. X      make_ecu_subdir()
  1041. X!     mem_cpy(dest,src,len)
  1042. X      mode_map(mode,mode_str)
  1043. X      pad_zstr_to_len(zstr,len)
  1044. X      perror_errmsg(str)
  1045. X***************
  1046. X*** 27,32
  1047. X      print_cwd(curdir,buf_size)
  1048. X      skip_ld_break(zstr)
  1049. X      str_token(parsestr,termchars)
  1050. X      yes_or_no(strarg)
  1051. X  
  1052. X  ------------------------------------------------------------------------*/
  1053. X
  1054. X--- 28,34 -----
  1055. X      print_cwd(curdir,buf_size)
  1056. X      skip_ld_break(zstr)
  1057. X      str_token(parsestr,termchars)
  1058. X+     strip_trail_break(zstr)
  1059. X      yes_or_no(strarg)
  1060. X  
  1061. X  ------------------------------------------------------------------------*/
  1062. X***************
  1063. X*** 31,36
  1064. X  
  1065. X  ------------------------------------------------------------------------*/
  1066. X  /*+:EDITS:*/
  1067. X  /*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
  1068. X  /*:04-16-1991-15:45-wht@n4hgf-gcc cannot use memmove */
  1069. X  /*:03-18-1991-22:31-wht@n4hgf-ISC 2.2 has mkdir() */
  1070. X
  1071. X--- 33,39 -----
  1072. X  
  1073. X  ------------------------------------------------------------------------*/
  1074. X  /*+:EDITS:*/
  1075. X+ /*:08-13-1991-13:53-wht@n4hgf-UNIX and ISC nap() broken; XENIX still wins */
  1076. X  /*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
  1077. X  /*:04-16-1991-15:45-wht@n4hgf-gcc cannot use memmove */
  1078. X  /*:03-18-1991-22:31-wht@n4hgf-ISC 2.2 has mkdir() */
  1079. X***************
  1080. X*** 980,984
  1081. X  }    /* end of defeat_optimize_to_work_around_bug */
  1082. X  
  1083. X  #endif /* __GNUC__ */
  1084. X  /* end of ecuutil.c */
  1085. X  /* vi: set tabstop=4 shiftwidth=4: */
  1086. X
  1087. X--- 983,1056 -----
  1088. X  }    /* end of defeat_optimize_to_work_around_bug */
  1089. X  
  1090. X  #endif /* __GNUC__ */
  1091. X+ 
  1092. X+ /*+-------------------------------------------------------------------------
  1093. X+     Nap(msec) - wrapper for nap()
  1094. X+ 
  1095. X+ ISC and SCO UNIX nap() misbehave.  This kludge doesn't return the
  1096. X+ proper value (the actual time slept), but at least it does not make
  1097. X+ a mockery of the manual page.  It says:
  1098. X+ 
  1099. X+      NAP(S)               UNIX System V            NAP(S)
  1100. X+ 
  1101. X+      Name
  1102. X+       nap -    suspends execution for a short interval
  1103. X+ 
  1104. X+      Syntax
  1105. X+       long nap(period)
  1106. X+       long period;
  1107. X+ 
  1108. X+      Description
  1109. X+       The current process is suspended from    execution for at least
  1110. X+       the number of    milliseconds specified by period, or until a
  1111. X+       signal is received.
  1112. X+ 
  1113. X+      Return Value
  1114. X+       On successful    completion, a long integer indicating the
  1115. X+       number of milliseconds actually slept    is returned. If    the
  1116. X+       process received a signal while napping, the return value
  1117. X+       will be -1, and errno    will be    set to EINTR.
  1118. X+ 
  1119. X+      See Also
  1120. X+       sleep(S)
  1121. X+ 
  1122. X+      Notes
  1123. X+       This function    is driven by the system    clock, which in    most
  1124. X+       cases    has a granularity of tens of milliseconds.  This
  1125. X+       function must    be linked with the linker option -lx.
  1126. X+ 
  1127. X+ It appears nap() under UNIX 3.2.x has departed virtually entirely from
  1128. X+ the manual page.  I'm beginning to look rather silly in several
  1129. X+ milleus since I keep telling people SCO UNIX is a viable upgrade from
  1130. X+ XENIX.  But process control people need some kind of timing capability
  1131. X+ less than one second and we can't do it with nap or select.
  1132. X+ 
  1133. X+ nap(msec) is supposed to nap *at least* msec milliseconds.  However,
  1134. X+ if msec is specified less than 1000/HZ + 1, it will not nap at all.
  1135. X+ This was true for 3.2.0 and 3.2.1.
  1136. X+ 
  1137. X+ It is supposed to return the number of milliseconds it actually
  1138. X+ slept.  Instead, it appears to "save up" the values and return them in
  1139. X+ lots of 1000. This behavior is true for 3.2.2.
  1140. X+ 
  1141. X+ As it is nap() is nearly useless.  I believe select() suffers
  1142. X+ from the same deficiency (< 1000 msec timeout becomes 1000 msec) but
  1143. X+ I haven't "proven" it yet.
  1144. X+ --------------------------------------------------------------------------*/
  1145. X+ long
  1146. X+ Nap(msec)
  1147. X+ long msec;
  1148. X+ {
  1149. X+ #if defined(M_XENIX) || defined(WORKING_UNIX_NAP)
  1150. X+     return(nap(msec));
  1151. X+ #else
  1152. X+     if(msec < hzmsec)
  1153. X+         msec = hzmsec;
  1154. X+     if(nap(msec) < 0)
  1155. X+         return(-1);
  1156. X+     return(msec);
  1157. X+ #endif
  1158. X+ }    /* end of Nap */
  1159. X+ 
  1160. X  /* end of ecuutil.c */
  1161. X  /* vi: set tabstop=4 shiftwidth=4: */
  1162. X*** /u1/src/ecu311/ecuxenix.c    Thu Jul 25 12:57:00 1991
  1163. X--- ecuxenix.c    Tue Aug 13 15:28:52 1991
  1164. X***************
  1165. X*** 20,25
  1166. X    This module is a grab bag for historical reasons.  Needs reorg.
  1167. X  ------------------------------------------------------------------*/
  1168. X  /*+:EDITS:*/
  1169. X  /*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
  1170. X  /*:07-17-1991-07:04-wht@n4hgf-avoid SCO UNIX nap bug */
  1171. X  /*:07-14-1991-18:18-wht@n4hgf-new ttygets functions */
  1172. X
  1173. X--- 20,26 -----
  1174. X    This module is a grab bag for historical reasons.  Needs reorg.
  1175. X  ------------------------------------------------------------------*/
  1176. X  /*+:EDITS:*/
  1177. X+ /*:08-13-1991-15:28-wht@n4hgf-more problems with history manager */
  1178. X  /*:07-25-1991-12:57-wht@n4hgf-ECU release 3.10 */
  1179. X  /*:07-17-1991-07:04-wht@n4hgf-avoid SCO UNIX nap bug */
  1180. X  /*:07-14-1991-18:18-wht@n4hgf-new ttygets functions */
  1181. X***************
  1182. X*** 163,169
  1183. X              switch(delim)
  1184. X              {
  1185. X                  case XFhome:
  1186. X-                 case XFend:
  1187. X                  case XFpgup:
  1188. X                  case XFpgdn:
  1189. X                  case XFcurup:
  1190. X
  1191. X--- 164,169 -----
  1192. X              switch(delim)
  1193. X              {
  1194. X                  case XFhome:
  1195. X                  case XFpgup:
  1196. X                  case XFcurup:
  1197. X                      if(icmd_history_manager(delim,icmd_buf,sizeof(icmd_buf)))
  1198. X***************
  1199. X*** 165,171
  1200. X                  case XFhome:
  1201. X                  case XFend:
  1202. X                  case XFpgup:
  1203. X-                 case XFpgdn:
  1204. X                  case XFcurup:
  1205. X                  case XFcurdn:
  1206. X                      if(icmd_history_manager(delim,icmd_buf,sizeof(icmd_buf)))
  1207. X
  1208. X--- 165,170 -----
  1209. X              {
  1210. X                  case XFhome:
  1211. X                  case XFpgup:
  1212. X                  case XFcurup:
  1213. X                      if(icmd_history_manager(delim,icmd_buf,sizeof(icmd_buf)))
  1214. X                      {
  1215. X***************
  1216. X*** 167,173
  1217. X                  case XFpgup:
  1218. X                  case XFpgdn:
  1219. X                  case XFcurup:
  1220. X-                 case XFcurdn:
  1221. X                      if(icmd_history_manager(delim,icmd_buf,sizeof(icmd_buf)))
  1222. X                      {
  1223. X                          ring_bell();
  1224. X
  1225. X--- 166,171 -----
  1226. X                  case XFhome:
  1227. X                  case XFpgup:
  1228. X                  case XFcurup:
  1229. X                      if(icmd_history_manager(delim,icmd_buf,sizeof(icmd_buf)))
  1230. X                      {
  1231. X                          ring_bell();
  1232. X***************
  1233. X*** 174,179
  1234. X                          ttygets_flags |= 4;
  1235. X                          goto GET_ICMD;
  1236. X                      }
  1237. X                  case ESC:
  1238. X                  case NL:
  1239. X                      break;
  1240. X
  1241. X--- 172,178 -----
  1242. X                          ttygets_flags |= 4;
  1243. X                          goto GET_ICMD;
  1244. X                      }
  1245. X+                     break;
  1246. X                  case ESC:
  1247. X                  case NL:
  1248. X                      break;
  1249. X***************
  1250. X*** 179,184
  1251. X                      break;
  1252. X                  default:
  1253. X                      ring_bell();
  1254. X                      ttygets_flags |= 4;
  1255. X                      goto GET_ICMD;
  1256. X              }
  1257. X
  1258. X--- 178,186 -----
  1259. X                      break;
  1260. X                  default:
  1261. X                      ring_bell();
  1262. X+                     itmp = strlen((char *)icmd_buf);
  1263. X+                     while(itmp--)
  1264. X+                         ff(se,"\b \b");
  1265. X                      ttygets_flags |= 4;
  1266. X                      goto GET_ICMD;
  1267. X              }
  1268. X***************
  1269. X*** 265,271
  1270. X          while(count--)
  1271. X          {
  1272. X              write(fd,&bellch,1);    
  1273. X!             nap((long)nap_msec);
  1274. X          }
  1275. X      }
  1276. X  }    /* end of send_bell_fd */
  1277. X
  1278. X--- 267,273 -----
  1279. X          while(count--)
  1280. X          {
  1281. X              write(fd,&bellch,1);    
  1282. X!             Nap((long)nap_msec);
  1283. X          }
  1284. X      }
  1285. X  }    /* end of send_bell_fd */
  1286. X*** /u1/src/ecu311/ecuxfer.c    Thu Jul 25 12:57:00 1991
  1287. X--- ecuxfer.c    Tue Aug 13 13:50:47 1991
  1288. X***************
  1289. X*** 988,994
  1290. X      }
  1291. X      lreset_ksr();
  1292. X      file_xfer_done_bell();
  1293. X!     nap(20L);
  1294. X      start_rcvr_process(1);
  1295. X  }    /* end of receive_files_from_remote */
  1296. X  /* end of ecuxfer.c */
  1297. X
  1298. X--- 988,994 -----
  1299. X      }
  1300. X      lreset_ksr();
  1301. X      file_xfer_done_bell();
  1302. X!     Nap(20L);
  1303. X      start_rcvr_process(1);
  1304. X  }    /* end of receive_files_from_remote */
  1305. X  /* end of ecuxfer.c */
  1306. X*** /u1/src/ecu311/expresp.c    Tue Aug 13 15:53:17 1991
  1307. X--- expresp.c    Tue Aug 13 13:50:48 1991
  1308. X***************
  1309. X*** 247,253
  1310. X              {
  1311. X                  case 'p':  /* pause (approximately 1/4-1/2 second delay) */
  1312. X                      ldraino(0);    /* wait for output to drain */
  1313. X!                     nap(400L);
  1314. X                      break;
  1315. X                  case 'm':  /* nap a while (non-standard) */
  1316. X                      ltmp = atol(str + 1);
  1317. X
  1318. X--- 247,253 -----
  1319. X              {
  1320. X                  case 'p':  /* pause (approximately 1/4-1/2 second delay) */
  1321. X                      ldraino(0);    /* wait for output to drain */
  1322. X!                     Nap(400L);
  1323. X                      break;
  1324. X                  case 'm':  /* nap a while (non-standard) */
  1325. X                      ltmp = atol(str + 1);
  1326. X***************
  1327. X*** 253,259
  1328. X                      ltmp = atol(str + 1);
  1329. X                      str += strspn(str + 1,"0123456789");
  1330. X                      ldraino(0);    /* wait for output to drain */
  1331. X!                     nap((ltmp < hzmsec) ? hzmsec : ltmp);
  1332. X                      break;
  1333. X                  case 'd':  /* delay (2 seconds) */
  1334. X                      ldraino(0);    /* wait for output to drain */
  1335. X
  1336. X--- 253,259 -----
  1337. X                      ltmp = atol(str + 1);
  1338. X                      str += strspn(str + 1,"0123456789");
  1339. X                      ldraino(0);    /* wait for output to drain */
  1340. X!                     Nap((ltmp < hzmsec) ? hzmsec : ltmp);
  1341. X                      break;
  1342. X                  case 'd':  /* delay (2 seconds) */
  1343. X                      ldraino(0);    /* wait for output to drain */
  1344. X***************
  1345. X*** 257,263
  1346. X                      break;
  1347. X                  case 'd':  /* delay (2 seconds) */
  1348. X                      ldraino(0);    /* wait for output to drain */
  1349. X!                     nap(2000L);
  1350. X                      break;
  1351. X                  case 'D':  /* phone number/token */
  1352. X                      if(expresp_echo_check)
  1353. X
  1354. X--- 257,263 -----
  1355. X                      break;
  1356. X                  case 'd':  /* delay (2 seconds) */
  1357. X                      ldraino(0);    /* wait for output to drain */
  1358. X!                     Nap(2000L);
  1359. X                      break;
  1360. X                  case 'D':  /* phone number/token */
  1361. X                      if(expresp_echo_check)
  1362. X***************
  1363. X*** 302,308
  1364. X          if(expresp_echo_check)
  1365. X          {
  1366. X              ldraino(1);        /* wait for output to drain, then flush input */
  1367. X!             nap(40L);        /* fake it */
  1368. X          }
  1369. X          str++;
  1370. X      }
  1371. X
  1372. X--- 302,308 -----
  1373. X          if(expresp_echo_check)
  1374. X          {
  1375. X              ldraino(1);        /* wait for output to drain, then flush input */
  1376. X!             Nap(40L);        /* fake it */
  1377. X          }
  1378. X          str++;
  1379. X      }
  1380. X*** /u1/src/ecu311/pcmd.c    Tue Aug 13 15:53:26 1991
  1381. X--- pcmd.c    Tue Aug 13 13:50:49 1991
  1382. X***************
  1383. X*** 692,698
  1384. X              interval = hzmsec;        /* SCO nap bug */
  1385. X          if(proctrace && (interval > 100))    /* short naps hurt by pprintf */
  1386. X              pprintf("nap %ld msec\n",interval);
  1387. X!         if(nap(interval) == -1)        /* EINTR is the only error returned ... */
  1388. X          {                            /* but check anyway */
  1389. X              if(errno == EINTR)
  1390. X                  erc = eCONINT;
  1391. X
  1392. X--- 692,698 -----
  1393. X              interval = hzmsec;        /* SCO nap bug */
  1394. X          if(proctrace && (interval > 100))    /* short naps hurt by pprintf */
  1395. X              pprintf("nap %ld msec\n",interval);
  1396. X!         if(Nap(interval) == -1)        /* EINTR is the only error returned ... */
  1397. X          {                            /* but check anyway */
  1398. X              if(errno == EINTR)
  1399. X                  erc = eCONINT;
  1400. SHAR_EOF
  1401. chmod 0644 PATCH2.01 ||
  1402. echo 'restore of PATCH2.01 failed'
  1403. Wc_c="`wc -c < 'PATCH2.01'`"
  1404. test 29065 -eq "$Wc_c" ||
  1405.     echo 'PATCH2.01: original size 29065, current size' "$Wc_c"
  1406. fi
  1407. exit 0
  1408.  
  1409. ----------------------------------------------------------------------------
  1410. Warren Tucker, TuckerWare, Mountain Park, GA         wht@n4hgf.Mt-Park.GA.US
  1411. "The computer can't tell you the emotional story.  It can give you the exact
  1412. mathematical design, but what's missing is the eyebrows." -- Frank Zappa
  1413.  
  1414. exit 0 # Just in case...
  1415. -- 
  1416. Kent Landfield                   INTERNET: kent@sparky.IMD.Sterling.COM
  1417. Sterling Software, IMD           UUCP:     uunet!sparky!kent
  1418. Phone:    (402) 291-8300         FAX:      (402) 291-4362
  1419. Please send comp.sources.misc-related mail to kent@uunet.uu.net.
  1420.